/**
 * Copyright(C): CETC-32
 * @Description: 用户管理数据库实体操作
 * @author: youqing
 * @version: 1.0
 * @date: 2020/9/11 10:55
 * 更改描述：
 */
package com.cetc32.dh.mybatis;

import com.cetc32.dh.dto.AdminUserDTO;
import com.cetc32.dh.dto.UserSearchDTO;
import com.cetc32.dh.entity.BaseAdminUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mapper.MyMapper;
import java.util.List;

/**
 * @Title: BaseAdminUserMapper
 * @Description:
 * @author: youqing
 * @version: 1.0
 * @date: 2020/11/21 11:19
 */
@Repository
public interface BaseAdminUserMapper extends MyMapper<BaseAdminUser> {

    List<AdminUserDTO> getUserList(UserSearchDTO userSearchDTO);

    BaseAdminUser getUserByUserName(@Param("sysUserName") String sysUserName, @Param("id") Integer id);

    int updateUserStatus(@Param("id") Integer id, @Param("status") Integer status);

    int updateUser(BaseAdminUser user);

    BaseAdminUser findByUserName(@Param("userName") String userName);

    int updatePwd(@Param("userName") String userName, @Param("password") String password);

    List<AdminUserDTO> getUserRole(@Param("roleId") Integer roleId);

}